package com.ces.knacky.model;

import java.io.Serializable;
import java.util.Date;
import org.apache.commons.lang.builder.EqualsBuilder;
import org.apache.commons.lang.builder.HashCodeBuilder;
import org.apache.commons.lang.builder.ToStringBuilder;

import com.ces.knacky.framework.model.AbstractEntity;

/** @author Hibernate CodeGenerator */
public class ItemWorkflowAudit extends AbstractEntity implements Serializable {

    /** nullable persistent field */
    private String comments;

    /** persistent field */
    private com.ces.knacky.model.ItemWorkflowStatus itemWorkflowStatus;

    /** persistent field */
    private com.ces.knacky.model.Item item;

    /** persistent field */
    private com.ces.knacky.model.UserTable user;

    /** full constructor */
    public ItemWorkflowAudit(Date createTime, Date updateTime, String comments, com.ces.knacky.model.ItemWorkflowStatus itemWorkflowStatus, com.ces.knacky.model.Item item, com.ces.knacky.model.UserTable user) {
        this.createTime = createTime;
        this.updateTime = updateTime;
        this.comments = comments;
        this.itemWorkflowStatus = itemWorkflowStatus;
        this.item = item;
        this.user = user;
    }

    /** default constructor */
    public ItemWorkflowAudit() {
    }

    /** minimal constructor */
    public ItemWorkflowAudit(com.ces.knacky.model.ItemWorkflowStatus itemWorkflowStatus, com.ces.knacky.model.Item item, com.ces.knacky.model.UserTable user) {
        this.itemWorkflowStatus = itemWorkflowStatus;
        this.item = item;
        this.user = user;
    }

    public Date getCreateTime() {
        return this.createTime;
    }

    public void setCreateTime(Date createTime) {
        this.createTime = createTime;
    }

    public Date getUpdateTime() {
        return this.updateTime;
    }

    public void setUpdateTime(Date updateTime) {
        this.updateTime = updateTime;
    }

    public String getComments() {
        return this.comments;
    }

    public void setComments(String comments) {
        this.comments = comments;
    }

    public com.ces.knacky.model.ItemWorkflowStatus getItemWorkflowStatus() {
        return this.itemWorkflowStatus;
    }

    public void setItemWorkflowStatus(com.ces.knacky.model.ItemWorkflowStatus itemWorkflowStatus) {
        this.itemWorkflowStatus = itemWorkflowStatus;
    }

    public com.ces.knacky.model.Item getItem() {
        return this.item;
    }

    public void setItem(com.ces.knacky.model.Item item) {
        this.item = item;
    }

    public com.ces.knacky.model.UserTable getUser() {
        return this.user;
    }

    public void setUser(com.ces.knacky.model.UserTable user) {
        this.user = user;
    }

    public String toString() {
        return new ToStringBuilder(this)
            .append("itemWorkflowAuditId", getId())
            .toString();
    }

    public boolean equals(Object other) {
        if ( !(other instanceof ItemWorkflowAudit) ) return false;
        ItemWorkflowAudit castOther = (ItemWorkflowAudit) other;
        return new EqualsBuilder()
            .append(this.getId(), castOther.getId())
            .isEquals();
    }

    public int hashCode() {
        return new HashCodeBuilder()
            .append(getId())
            .toHashCode();
    }

}
